﻿<%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %>
<%@ Assembly Name="Microsoft.Web.CommandUI, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register TagPrefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls"
    Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register TagPrefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Import Namespace="Microsoft.SharePoint" %>
<%@ Register TagPrefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages"
    Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="VisualWebPart1.ascx.cs"
    Inherits="MotesRummet_JQueryWebPart.VisualWebPart1.VisualWebPart1" %>
<%@ Register Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI" TagPrefix="asp" %>

<asp:HiddenField ID="hdnSelectedTab" runat="server" Value="0" />
<asp:HiddenField ID="hdnSiteUrl" runat="server" Value="" />
<asp:HiddenField ID="hdnSiteTitle" runat="server" Value="" />
<asp:HiddenField ID="hdnSiteDescription" runat="server" Value="" />




<script src="../Scripts/jquery.js" type="text/javascript"></script>
<script src="../Scripts/jquery2.js" type="text/javascript"></script>
<script src="../Scripts/jquery-ui-custom.js" type="text/javascript"></script>

<link rel="stylesheet" href="../Scripts/jquery-ui.css" />

<script type="text/javascript">
$(function () {
   $("#tabs").tabs({
       show: function() {
          var selectedTab = $('#tabs').tabs('option', 'selected');
          $("#<%= hdnSelectedTab.ClientID %>").val(selectedTab);
          },
       selected: <%= hdnSelectedTab.Value %>
   });
 });
</script>


    <script type="text/javascript">
        var cancel = '#<%=btn_cancel.ClientID%>';
        var skapa = '#<%= btn_createSite.ClientID%>';
        var del = '#<%= btn_cancel.ClientID%>';

        var hdnUrl = '#<%= hdnSiteUrl.ClientID %>';
        var hdnTitle = '#<%= hdnSiteTitle.ClientID %>';
        var hdnDescription = '#<%= hdnSiteDescription.ClientID %>';
    
        

        $(document).ready(function () {
            $('#dialog').dialog({
                closeOnEscape: false,
                modal: true
            });
            $(skapa).click(function () {

                var txtUrl = $("#<%= txtBox_Url.ClientID %>").val();
                $(hdnUrl).val(txtUrl);
                var txtTitle = $("#<%= txtBox_Title.ClientID %>").val();
                $(hdnTitle).val(txtTitle);
                var txtDesc = $("#<%= txt_description.ClientID %>").val();
                $(hdnDescription).val(txtDesc);

            });

                
            $(del).click(function () {

                $("#<%= DropDwn_Delete_Web.ClientID %>").val();
                
                
                
            });

            $(cancel).click(function (event) {
                window.location.href = "http://motesrummet.se/SitePages/Home.aspx";
                return false;
            });
            
        });
        
    </script>


<div id="container">
    <div id="dialog">
        <div id="tabs">
            <ul>
                <li><a href="#tabs-1">Lagg till...</a></li>
                <li><a href="#tabs-2">Ta bort...</a></li>
            </ul>
            <div id="tabs-1">


                <p>
                    URL:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                </p>
                <p>
                    <asp:TextBox ID="txtBox_Url" runat="server" Width="155px"></asp:TextBox>
                   
                    
                </p>
                <p>
                    Titel:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                </p>
                <p>
                    &nbsp;<asp:TextBox ID="txtBox_Title" runat="server" OnTextChanged="txtBox_Title_TextChanged"
                        Width="155px"></asp:TextBox>
                </p>
                <p>
                    Beskrivning:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                </p>
                <p>
                    <asp:TextBox ID="txt_description" runat="server" Width="155px"></asp:TextBox>
                </p>
                <div class="classname">
                    <asp:LinkButton ID="btn_createSite" runat="server" Text="Skapa Namnd" 
                        OnClick="btn_createSite_Click1"
                        ToolTip="skapa namnd" />
                        </div>
                
                <asp:Label ID="lbl_update" runat="server"></asp:Label>
                <p>
                    &nbsp;</p>
            </div>
            <div id="tabs-2">
                <asp:Label ID="Label1" runat="server" Text="Valj namnd:"></asp:Label>
                <br />
                <p>
                    <asp:DropDownList ID="DropDwn_Delete_Web" runat="server" Height="20px" Width="166px">
                    </asp:DropDownList></p>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <div class="classname">
                    <asp:LinkButton ID="btn_delete_web" runat="server" Text="Ta bort" Style="margin-left: 0px"
                        OnClick="btn_delete_web_Click" />
                        </div>
                
                
                    <asp:Label ID="lbl_delete" runat="server"></asp:Label>
                
            </div>
            <asp:Button ID="btn_cancel" runat="server" Text="Avbryt" />
        </div>
    </div>
</div>
